package com.dzsw.test.mybatisp.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dzsw.test.mybatisp.entity.TUser;
import com.dzsw.test.mybatisp.entity.User;
import com.dzsw.test.mybatisp.mapper.TUserMapper;
import com.dzsw.test.mybatisp.service.ITUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author admin
 * @since 2020-08-20
 */
@Service
public class TUserServiceImpl extends ServiceImpl<TUserMapper, TUser> implements ITUserService {

    @Resource
    private TUserMapper mapper;

    @Override
    public List<TUser> s1(int page, int size) {
        Page<TUser> p = new Page<>();
        p.setSize(size);
        p.setCurrent(page);
        List<TUser> list = mapper.selectPageVo(p, 1);
        return list;
    }
}
